﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CTP.CRM.Core.Common.Dto
{
    public class UnifyPageResultDto<T>
    {
        public PageInfoOutput Pagination { get; set; }

        public List<T> List { get; set; }

        public UnifyPageResultDto()
        {
        }

        public UnifyPageResultDto(List<T> list, int pageIndex, int pageSize, int total)
        {
            List = list;
            Pagination = Pagination ?? new PageInfoOutput();
            Pagination.PageIndex = pageIndex;
            Pagination.PageSize = pageSize;
            Pagination.Total = total;
        }
    }
}
